import 'package:flutter/material.dart';
import 'package:flutter_shop/pages/home/tab_Index/index_recommond_data.dart';

class IndexRecommondItemWidget extends StatelessWidget {
  final IndexRecommondItem data;

  const IndexRecommondItemWidget({Key key, this.data}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () {
        Navigator.pushNamed(context, data.navigatorUrl);
      },
      child: Container(
        width: (MediaQuery.of(context).size.width - 10 * 3) / 2,
        height: 100,
        color: Colors.white,
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [Text(data.title), Text(data.subTitle)],
        ),
      ),
    );
  }
}
